//
//  AllCar.m
//  UI19_Work 汽车之家
//
//  Created by dllo on 16/8/9.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "AllCar.h"

@implementation AllCar

- (instancetype)initWithDictionary:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (AllCar *)allCarWithDictionary:(NSDictionary *)dic {
    return [[self alloc] initWithDictionary:dic];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        _car_id = value;
    }
}

- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}

- (NSString *)description {
    return [NSString stringWithFormat:@"%@, %@, %@", _car_id, _name, _imgurl];
}

@end
